package com.rn.ddd.infrastructure.engine.annotation;

import com.rn.ddd.infrastructure.engine.constant.OrderEventEnum;
import com.rn.ddd.infrastructure.engine.constant.OrderStateEnum;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;

/**
 * 订单处理器注解
 *
 * @author 然诺
 * @date 2022/3/5
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Component
public @interface OrderProcessor {

    /**
     * 状态
     */
    OrderStateEnum[] states() default {};

    /**
     * 事件
     */
    OrderEventEnum event();

    /**
     * 业务类型
     */
    String[] bizTypes() default {};

    /**
     * 场景
     */
    String[] sceneIds() default {};

}
